"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
  data() {
    return {
      images: [],
      type: "center",
      msgType: "success",
      messageText: "这是一条成功提示",
      value: "",
      editState: false,
      editStateString: "编辑",
      imageCurrentNum: 0
    };
  },
  onReady() {
  },
  methods: {
    select() {
      this.imageCurrentNum++;
    },
    deleted() {
      this.imageCurrentNum--;
    },
    shareToggle() {
      this.$refs.share.open();
    },
    changeEditState() {
      if (this.editState) {
        this.editState = false;
        this.editStateString = "编辑";
      } else {
        if (this.imageCurrentNum == 0) {
          this.messageToggle("error");
          return;
        }
        this.editState = true;
        this.editStateString = "完成";
      }
    },
    messageToggle(type) {
      this.msgType = type;
      this.messageText = `暂无可编辑的图片`;
      this.$refs.message.open();
    }
  }
};
if (!Array) {
  const _easycom_uni_file_picker2 = common_vendor.resolveComponent("uni-file-picker");
  const _easycom_uni_popup_share2 = common_vendor.resolveComponent("uni-popup-share");
  const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
  const _easycom_uni_popup_message2 = common_vendor.resolveComponent("uni-popup-message");
  (_easycom_uni_file_picker2 + _easycom_uni_popup_share2 + _easycom_uni_popup2 + _easycom_uni_popup_message2)();
}
const _easycom_uni_file_picker = () => "../../node-modules/@dcloudio/uni-ui/lib/uni-file-picker/uni-file-picker.js";
const _easycom_uni_popup_share = () => "../../node-modules/@dcloudio/uni-ui/lib/uni-popup-share/uni-popup-share.js";
const _easycom_uni_popup = () => "../../node-modules/@dcloudio/uni-ui/lib/uni-popup/uni-popup.js";
const _easycom_uni_popup_message = () => "../../node-modules/@dcloudio/uni-ui/lib/uni-popup-message/uni-popup-message.js";
if (!Math) {
  (_easycom_uni_file_picker + _easycom_uni_popup_share + _easycom_uni_popup + _easycom_uni_popup_message)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  return {
    a: common_vendor.t($data.editStateString),
    b: common_vendor.o((...args) => $options.changeEditState && $options.changeEditState(...args)),
    c: common_vendor.o(_ctx.progress),
    d: common_vendor.o(_ctx.success),
    e: common_vendor.o(_ctx.fail),
    f: common_vendor.o($options.select),
    g: common_vendor.o($options.deleted),
    h: common_vendor.o($options.shareToggle),
    i: common_vendor.o(($event) => _ctx.imageValue = $event),
    j: common_vendor.p({
      ["file-mediatype"]: "image",
      mode: "grid",
      ["file-extname"]: "png,jpg",
      limit: 18,
      fil: $data.images,
      ["del-icon"]: $data.editState,
      ["auto-upload"]: true,
      modelValue: _ctx.imageValue
    }),
    k: common_vendor.sr("share", "29a7b18a-1"),
    l: common_vendor.p({
      type: "share",
      safeArea: true,
      backgroundColor: "#fff"
    }),
    m: common_vendor.p({
      type: $data.msgType,
      message: $data.messageText,
      duration: 2e3
    }),
    n: common_vendor.sr("message", "29a7b18a-3"),
    o: common_vendor.p({
      type: "message"
    })
  };
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createPage(MiniProgramPage);
